@ECHO OFF
ECHO BACKUP_CURRENT_DIR.CMD
ECHO THIS BATCH DOES TAKE BACK UP OF THE CURRENT DIRECTORY 
ECHO INTO THE UPPER DIRECTORY WITH A TIME STAMP 
ECHO FIND ::pause REPLACE pause TO ENABLE DEBUGGING 



ECHO SETTING UP THE CURRENT DIRECTORY 
set DirName=%CD%
echo DirName is %DirName%
::pause

:: ECHO ADJUST THE DELIMS=. TO THE CHACHATER OF YOUR PROMPT 
:: ADD THE DATE STAMP TO THE DIRECTORY NAME
for /f "delims=. tokens=1,2,3" %%i in ('echo %DATE%') do echo off&echo %%i.%%j.%%k
for /f "delims=. tokens=1,2,3" %%i in ('echo %DATE%') do set DirName=%DirName%.%%i.%%j.%%k

echo DirName is %DirName%
::pause

ECHO TOKENS TELLS WHICH ARE THE WORDS TO SPLIT THE 'echo %time%' command
::ADD THE TIME STAMP TO THE DIRECTORY NAME
for /f "delims=: tokens=1,2,3" %%i in ('echo %time%') do echo off&echo %%i.%%j.%%k
for /f "delims=: tokens=1,2,3" %%i in ('echo %time%') do set DirName=%DirName%.%%i.%%j.%%k


echo DirName is %DirName%
:: pause


ECHO BACKUP CURRENT DIRECTORY RECURSIVELY 
xcopy /S /E /Y /I "%CD%" "%DirName%"

ECHO PRESS ENTER TO EXIT 
pause